package com.misty.blog.config;//package com.misty.admin.config;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//
//
//
//@Configuration
//public class PicConfig implements WebMvcConfigurer {
//    @Value("${upload.photo}")
//    private String CAREPHOTO;
//    @Value("${upload.report}")
//    private String CAREREPORT;
//
//    @Value("${upload.headPhoto}")
//    private String HEADPHOTO;
//
//    @Override
//    public void addResourceHandlers(ResourceHandlerRegistry registry) {
////        if (!registry.hasMappingForPattern("/carePhoto/**")){
////            registry.addResourceHandler("/carePhoto/**").addResourceLocations("file:///D:/Desktop/test1/");
////        }
////        if (!registry.hasMappingForPattern("/careReport/**")) {
////            registry.addResourceHandler("/careReport/**").addResourceLocations("file:///D:/Desktop/test2/");
////        }
//
//        //test
//        // registry.addResourceHandler("chsp/programs/chsp/stg/webStatic/carePhoto/**").addResourceLocations(CAREPHOTO);
//        // registry.addResourceHandler("chsp/programs/chsp/stg/webStatic/careReport/**").addResourceLocations(CAREREPORT);
//        registry.addResourceHandler("/carePhoto/**").addResourceLocations("file://"+CAREPHOTO);
//        registry.addResourceHandler("/careReport/**").addResourceLocations("file://"+CAREREPORT);
//        registry.addResourceHandler("/chsp/careHeadPhoto/**").addResourceLocations("file:///"+HEADPHOTO);
//        }
//    }
//
